import React, { Component } from 'react'

const detailData = [
  { id: '001', content: '你好, React' },
  { id: '002', content: '你好, Vue' },
  { id: '003', content: '你好, Angular' },
]

export default class MsgDetail extends Component {
  render() {
    const { id, title } = this.props.match.params
    const findResult = detailData.find(item => item.id === id)
    return (
      <div>
        <ol>
          <li>id: {findResult.id}</li>
          <li>title: {title}</li>
          <li>content: {findResult.content}</li>
        </ol>
      </div>
    )
  }
}
